package com.ly.heart.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ly.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 勘测基础数据采集对象 erp_survey_data_collect_info
 * @author wutao
 * @date 2024-05-22
 */
@TableName ("erp_survey_base_data_info")
@ApiModel (value = "erp_survey_base_data_info对象", description = "勘测基础数据采集")
@Data
public class SurveyBaseDataEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId (value = "id", type = IdType.INPUT)
    private String id;

    /**
     * 客户Id
     */
    @ApiModelProperty ("客户Id")
    @TableField ("customer_id")
    @Excel (name = "客户Id")
    private String customerId;

    /**
     * 单据类型，写死：屋顶方资源收集
     */
    @ApiModelProperty ("单据类型，写死：屋顶方资源收集")
    @TableField ("receipt")
    @Excel (name = "单据类型")
    private String receipt;

    /**
     * 单据类型，写死：屋顶方资源收集
     */
    @ApiModelProperty ("单据编号，系统自动生成")
    @TableField ("receipt_number")
    @Excel (name = "单据编号，系统自动生成")
    private String receiptNumber;

    /**
     * 单据类型，写死：屋顶方资源收集
     */
    @ApiModelProperty ("业务员Id")
    @TableField ("business_user_id")
    @Excel (name = "业务员")
    private String businessUserId;

    /**
     * 单据类型，写死：屋顶方资源收集
     */
    @ApiModelProperty ("企业性质")
    @TableField ("enterprise_nature")
    @Excel (name = "企业性质")
    private String enterpriseNature;

    /**
     * 地区
     */
    @ApiModelProperty ("地区")
    @TableField ("region")
    @Excel (name = "地区")
    private String region;

    /**
     * 注册资本
     */
    @ApiModelProperty ("注册资本")
    @TableField ("registered_capital")
    @Excel (name = "注册资本")
    private String registeredCapital;

    /**
     * 渠道来源，关联字典表
     */
    @ApiModelProperty ("渠道来源，关联字典表")
    @TableField ("channel_source_value")
    @Excel (name = "渠道来源，关联字典表")
    private String channelSourceValue;

    /**
     * 渠道来源，关联字典表
     */
    @ApiModelProperty ("路条人Id，合作方Id")
    @TableField ("referee_id")
    @Excel (name = "路条人Id，合作方Id")
    private String refereeId;

    /**
     * 产权屋顶面积
     */
    @ApiModelProperty ("产权屋顶面积")
    @TableField ("area")
    @Excel (name = "产权屋顶面积")
    private String area;

    /**
     * 屋顶数量
     */
    @ApiModelProperty ("屋顶数量")
    @TableField ("number")
    @Excel (name = "屋顶数量")
    private Integer number;

    /**
     * 是否漏水;1：是;2：否
     */
    @ApiModelProperty ("是否漏水;1：是;2：否")
    @TableField ("is_leakage")
    @Excel (name = "是否漏水;1：是;2：否")
    private Integer isLeakage;

    /**
     * 生产模式
     */
    @ApiModelProperty ("生产模式")
    @TableField ("pro_mode")
    @Excel (name = "生产模式")
    private String proMode;

    /**
     * 企业征信是否合格;1：是;2：否
     */
    @ApiModelProperty ("企业征信是否合格;1：是;2：否")
    @TableField ("credit_qualified")
    @Excel (name = "企业征信是否合格;1：是;2：否")
    private Integer creditQualified;

    /**
     * 项目模式，关联字典表
     */
    @ApiModelProperty ("项目模式，关联字典表")
    @TableField ("project_mode_value")
    @Excel (name = "项目模式，关联字典表")
    private String projectModeValue;

    /**
     * 企业经营地址
     */
    @ApiModelProperty ("企业经营地址")
    @TableField ("address")
    @Excel (name = "企业经营地址")
    private String address;

    /**
     * 企业所属行业
     */
    @ApiModelProperty ("企业所属行业")
    @TableField ("enter_industry_value")
    @Excel (name = "企业所属行业")
    private String enterIndustryValue;

    /**
     * 企业有无搬迁计划;1：有;2：无
     */
    @ApiModelProperty ("企业有无搬迁计划;1：有;2：无")
    @TableField ("enter_relocation_plan_value")
    @Excel (name = "企业有无搬迁计划;1：有;2：无")
    private String enterRelocationPlanValue;

    /**
     * 计划搬迁日期
     */
    @ApiModelProperty ("计划搬迁日期")
    @TableField ("relocation_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "计划搬迁日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date relocationTime;

    /**
     * 是否需要投标;1：是;2：否
     */
    @ApiModelProperty ("是否需要投标;1：是;2：否")
    @TableField ("is_tender")
    @Excel (name = "是否需要投标;1：是;2：否")
    private Integer isTender;

    /**
     * 电压接入等级
     */
    @ApiModelProperty ("电压接入等级")
    @TableField ("voltage_level_value")
    @Excel (name = "电压接入等级")
    private String voltageLevelValue;

    /**
     * 备注
     */
    @ApiModelProperty ("备注")
    @TableField ("remarks")
    @Excel (name = "备注")
    private String remarks;

    /**
     * 申请人Id，登录用户Id
     */
    @ApiModelProperty ("申请人Id，登录用户Id")
    @TableField ("user_id")
    @Excel (name = "申请人Id，登录用户Id")
    private String userId;

    /**
     * 勘测类型;1:工商业;2:户用
     */
    @ApiModelProperty ("勘测类型;1:工商业;2:户用")
    @TableField ("type")
    @Excel (name = "勘测类型;1:工商业;2:户用")
    private Integer type;

    /**
     * 更新时间
     */
    @ApiModelProperty ("更新时间")
    @TableField ("change_time")
    @JsonFormat (pattern = "yyyy-MM-dd")
    @Excel (name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date changeTime;

    /**
     * $column.columnComment
     */
    @ApiModelProperty ("更新时间")
    @TableField ("is_used")
    @Excel (name = "更新时间")
    private Integer isUsed;

//    @TableField (exist = false)
//    private List<String> ids;

    @TableField(exist = false)
    private List<FileEntity> fileEntities;

    @ApiModelProperty("屋顶方资料字典编码")
    @TableField (exist = false)
    private List<SurveyDataDictEntity> dataDictEntities;

    @Override
    public String toString () {
        return new ToStringBuilder ( this, ToStringStyle.MULTI_LINE_STYLE )
                .append ( "id", getId () )
                .append ( "customerId", getCustomerId () )
                .append ( "region", getRegion () )
                .append ( "registeredCapital", getRegisteredCapital () )
                .append ( "channelSourceValue", getChannelSourceValue () )
                .append ( "area", getArea () )
                .append ( "number", getNumber () )
                .append ( "isLeakage", getIsLeakage () )
                .append ( "proMode", getProMode () )
                .append ( "creditQualified", getCreditQualified () )
                .append ( "projectModeValue", getProjectModeValue () )
                .append ( "address", getAddress () )
                .append ( "enterIndustryValue", getEnterIndustryValue () )
                .append ( "enterRelocationPlanValue", getEnterRelocationPlanValue () )
                .append ( "relocationTime", getRelocationTime () )
                .append ( "isTender", getIsTender () )
                .append ( "voltageLevelValue", getVoltageLevelValue () )
                .append ( "remarks", getRemarks () )
                .append ( "userId", getUserId () )
                .append ( "type", getType () )
                .append ( "createTime", getCreateTime () )
                .append ( "changeTime", getChangeTime () )
                .append ( "isUsed", getIsUsed () )
                .toString ();
    }
}
